const mongoose = require("mongoose");
const Schema = mongoose.Schema;

const testQuesSchema = new mongoose.Schema({
  //题目
  question: {
    type: String,
    required: [true, "you must tell us your  question"],
  },

  //选项
  options: {
    type: Array,
    required: [true, "you must tell us your  options"],
  },
  //题目类型    singleSelect单选   multiSelect多选
  type: {
    type: String,
    enum: ["singleSelect", "multiSelect"],
    required: [true, "you must tell us your type"],
  },
  //正确选项
  correntOption: {
    type: Array,
    required: [true, "you must tell us your correntOption"],
  },
});

const TestQues = mongoose.model("TestQues", testQuesSchema);
module.exports = TestQues;
